import { IBaseSelector } from '../base';

class InitiatorService extends IBaseSelector {
  init() {
    // 无
  }

  initData(): void {
    const element = this.panel.getElement();

    this.root.getModeling().updateProperties(
      element,
      {
        // eslint-disable-next-line no-template-curly-in-string
        'flowable:assignee': '${initiator}',
        'flowable:text': '流程发起人',
        'flowable:candidateGroups': undefined, // 清空多余的属性
      }
    );
  }
}

export default InitiatorService;
